<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>v-if与v-show</title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<span v-if="!flag">多点</span>
			<span v-show="flag">dmall</span>
			<button @click="toggle()">切换</button>
		</div>
	</body>
	<script>
		//view model
		new Vue({
			el:'#app',
			data: {
			    flag: true
			},
			methods: {
			    toggle: function() {
					this.flag = !this.flag;
				}
			}
		});
	</script>
</html>
